import { Profile } from '@/types/user'
const KEY = 'rabbit-83-profile'

// 保存
export const saveProfile = (profile: Profile) => {
  localStorage.setItem(KEY, JSON.stringify(profile))
}

// 获取
export const getProfile = () => {
  return JSON.parse(localStorage.getItem(KEY) || '{}')
}

// 删除
export const removeProfile = () => {
  localStorage.removeItem(KEY)
}
